First Documentation Section

Now it is time to create your first documentation section!

Suppose in our "example" group we want to add documentation for some global utilities functions that live in "javascript/lib/utilities.js". It makes sense to put global utilities into their own section, so let's add a "Globals" section to our group in the Gruntfile.js file configuration and add the scripts we want scanned for documentation.

module.exports = function(grunt) {

    // Project configuration
    grunt.initConfig({

        pkg: grunt.file.readJSON('package.json'),

        docular: {
            groups: [
                {
                    groupTitle: 'Example Docs',
                    groupId: 'example',
                    groupIcon: 'icon-beer',
                    sections: [
                        {
                            id: "globals",
                            title: "Globals",
                            scripts: [
                                "example/javascript/lib/utilities.js"
                            ],
                            docs: [],
                            rank : {}
                        }
                    ]
                }
            ],
            //other configurations ommitted here for simplicity
        }

    });

    // Load the plugin that provides the "docular" tasks.
    grunt.loadNpmTasks('grunt-docular');

    // Default task(s).
    grunt.registerTask('default', ['docular']);

};
WARNING: Make sure you understand the difference between scripts and docs